package com.health.institution.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import com.health.institution.domain.Department;

/**
 * 科室管理Mapper接口
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Mapper
public interface DepartmentMapper 
{
    /**
     * 查询所有一级科室
     */
    public List<Department> selectPrimaryDepartments();
    
    /**
     * 根据父科室ID查询子科室
     */
    public List<Department> selectDepartmentsByParentId(Long parentId);
    
    /**
     * 查询所有科室（树形结构）
     */
    public List<Department> selectDepartmentTree();
    
    /**
     * 根据ID查询科室
     */
    public Department selectDepartmentById(Long departmentId);
    
    /**
     * 查询机构关联的科室列表
     */
    public List<Department> selectDepartmentsByHospitalId(Long hospitalId);
}